<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymealeaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
    <meta charset="UTF-8">
    <title>Login</title>
    <link rel="stylesheet" href="/css/main.css" th:href="@{/css/main.css}"/>
</head>
<body>
<h1>Login Page</h1>
<p>User角色用户：user/123456</p>
<p>Admin角色用户：admin/123456</p>
<p th:if="${loginError}" class="error">用户名密码错误</p>
<form th:action="@{/login}" method="post">
    <label for="username">用户名</label>:
    <input type="text" id="username" name="username" autofocus="autofocus"/>
    <br/>
    <label for="password">密码</label>:
    <input type="password" id="password" name="password" autofocus="autofocus"/>
    <br/>
    <input type="submit" value="登录">
    <p><a href="/index" th:href="@{/index}">返回首页</a></p>
</form>
</body>
</html>